package com.example.sls.service.impl.social;

import com.example.sls.pojo.social.PrivateMessages;
import com.example.sls.dao.social.PrivateMessagesDao;
import com.example.sls.service.intserfaces.social.PrivateMessagesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 私信聊天表(PrivateMessages)表服务实现类
 *
 * @author 蓝江富
 * @since 2024-06-18 10:55:12
 */
@Service
public class PrivateMessagesServiceImpl implements PrivateMessagesService {
  @Autowired
  PrivateMessagesDao privateMessagesDao;

  @Override
  public PrivateMessages queryById(Integer id) {
    return privateMessagesDao.queryById(id);
  }

  @Override
  public int deleteById(Integer id) {
    return privateMessagesDao.deleteById(id);
  }

  @Override
  public int update(PrivateMessages privateMessages) {
    return privateMessagesDao.update(privateMessages);
  }

  @Override
  public int insert(PrivateMessages privateMessages) {
    return privateMessagesDao.insert(privateMessages);
  }

  @Override
  public long count() {
    return privateMessagesDao.count();
  }

  @Override
  public List<PrivateMessages> queryAllByLimit(PrivateMessages privateMessages, Integer pageSize, Integer offset) {
    return privateMessagesDao.queryAllByLimit(privateMessages, pageSize, offset);
  }
}
